/*
	Twitch
	Please leave credits to the origional devs where its due if edited.
*/

chat = {}

function chat.AddText(...)
	local ply
	if type(arg[1]) == "Player" then
		ply = arg[1]
	else
		ply = RecipientFilter()
		ply:AddAllPlayers()
	end
	umsg.Start("AddText",ply)
		umsg.Short(table.Count(arg))
		for _,v in pairs(arg) do
			if type(v) == "string" then
				umsg.String(v)
			elseif type(v) == "table" then
				umsg.Short(v.r)
				umsg.Short(v.g)
				umsg.Short(v.b)
				umsg.Short(v.a)
			end
		end
	umsg.End()
end
